package com.baoai.dto;

import java.io.Serializable;

/**
 * 页面统一返回数据
 * Created by xiaren on 2017/3/3.
 */
public class APIResponse<T> implements Serializable{
    public static final String SUCCESS = "1";
    public static final String FAIL = "0";
    private String status = SUCCESS;
    private String message;
    private T data;

    public String getStatus() {
        return this.status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return this.data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {

        return "APIResponse{" +
                "status='" + status + '\'' +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }

    public APIResponse() {
    }

    public static APIResponse getAPIResponse(){
        return new APIResponse();
    }
}
